package com.seek.springevent.config;

import com.alibaba.druid.pool.DruidDataSource;
import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceBuilder;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


@Configuration
public class DataSourceConfig {

    @Bean( initMethod="init" ,destroyMethod = "close",name = "dsManger")
    @ConfigurationProperties("spring.datasource.druid.dsManger")
    public DruidDataSource dsMangerDataSource(){
        return DruidDataSourceBuilder.create().build();
    }
}
